bitkeeper revision 1.1159.179.15 (419e4147MLxxTvBc9zlN1KN3pUk7BA)
authorcl349@arcadians.cl.cam.ac.uk <cl349@arcadians.cl.cam.ac.uk>
Fri, 19 Nov 2004 18:53:59 +0000 (18:53 +0000)
committercl349@arcadians.cl.cam.ac.uk <cl349@arcadians.cl.cam.ac.uk>
Fri, 19 Nov 2004 18:53:59 +0000 (18:53 +0000)
setup_arch_post.h:
  clear feature sep flag to avoid modification to sysenter.c
Makefile:
  g/c unmodified vmlinux.lds
ioremap.c, fault.c, timer_tsc.c, setup.c, ldt.c:
  Whitespace.
traps.c:
  Whitespace and remove unused code.
head.S:
  writable pagetables are always enabled
Makefile:
  g/c unmodified vmlinux.lds and sysenter.c
.del-sysenter.c~4edabffbf333447d:
  Delete: linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c
.del-vmlinux.lds.S~a6e49b85e6684b9a:
  Delete: linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S

13 files changed:
.rootkeys
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c [deleted file]
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S [deleted file]
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/fault.c
linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/ioremap.c
linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/Makefile
linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h

index 9745d45e2bbb5014b7b45ceb7e0784bfafdd6161..83246e5d437a1d68a7bea92c73c7f0983179bc31 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/process.c
 40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c
 40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/signal.c
-40f56238UL9uv78ODDzMwLL9yryeFw linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c
 40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c
 40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/Makefile
 40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
 40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c
-40f56238qASEI_IOhCKWNuwFKNZrKQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S
 40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vsyscall.S
 40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vsyscall.lds
 40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/Makefile
index 8e18bc5f1388ab782c164db7baca6a76f91b0988..014f324cc181c3b26c361ccf2df3ae073245ebf3 100644 (file)
@@ -6,7 +6,7 @@ XENARCH := $(subst ",,$(CONFIG_XENARCH))
 
 CFLAGS += -Iarch/$(XENARCH)/kernel
 
-extra-y := head.o init_task.o vmlinux.lds
+extra-y := head.o init_task.o
 
 obj-y  := process.o signal.o entry.o traps.o \
                time.o ioport.o ldt.o setup.o \
@@ -35,7 +35,7 @@ c-obj-$(CONFIG_X86_IO_APIC)   += io_apic.o
 c-obj-$(CONFIG_X86_NUMAQ)      += numaq.o
 c-obj-$(CONFIG_X86_SUMMIT_NUMA)        += summit.o
 c-obj-$(CONFIG_MODULES)                += module.o
-obj-y                          += sysenter.o
+c-obj-y                                += sysenter.o
 obj-y                          += vsyscall.o
 c-obj-$(CONFIG_ACPI_SRAT)      += srat.o
 c-obj-$(CONFIG_HPET_TIMER)     += time_hpet.o
@@ -46,8 +46,6 @@ EXTRA_AFLAGS   := -traditional
 
 c-obj-$(CONFIG_SCx200)         += scx200.o
 
-CPPFLAGS_vmlinux.lds += -U$(XENARCH)
-
 # vsyscall.o contains the vsyscall DSO images as __initdata.
 # We must build both images before we can assemble it.
 # Note: kbuild does not track this dependency due to usage of .incbin
index 1259369c03c28f10b47924275e317fbf3d261505..b8ac0568da979242cea116bca8d801c08780d6ce 100644 (file)
@@ -4,9 +4,7 @@
 .section __xen_guest
        .ascii  "GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=2.0,VIRT_BASE=0xC0000000"
        .ascii  ",LOADER=generic"
-#ifdef CONFIG_XEN_WRITABLE_PAGETABLES
        .ascii  ",PT_MODE_WRITABLE"
-#endif
        .byte   0
 
 .text
@@ -90,7 +88,6 @@ ENTRY(stack_start)
        .long init_thread_union+THREAD_SIZE
        .long __BOOT_DS
 
-# XXXcl
 .globl idt_descr
 .globl cpu_gdt_descr
 
@@ -99,7 +96,6 @@ ENTRY(stack_start)
 idt_descr:
        .word IDT_ENTRIES*8-1           # idt contains 256 entries
        .long idt_table
-# XXXcl
 
 # boot GDT descriptor (later on used by CPU#0):
        .word 0                         # 32 bit align gdt_desc.address
index 1a762ce99b25318de6533649b33f34559bf9ca98..1506972691603c5f8cea07896b0f40f58542ce1f 100644 (file)
@@ -125,8 +125,8 @@ void destroy_context(struct mm_struct *mm)
                if (mm == current->active_mm)
                        clear_LDT();
                make_pages_writable(mm->context.ldt, 
-                                    (mm->context.size * LDT_ENTRY_SIZE) /
-                                    PAGE_SIZE);
+                                   (mm->context.size * LDT_ENTRY_SIZE) /
+                                   PAGE_SIZE);
                flush_page_update_queue();
                if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
                        vfree(mm->context.ldt);
index c9574a4311f63e6ff52ccccb5b6cd131390ffac6..2e16c1ff0dbc3fef9f1597a836b98eb54e85c124 100644 (file)
@@ -686,7 +686,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
        int len = 0;
        int userdef = 0;
 
-        memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE);
+       memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE);
        /* Save unparsed command line copy for /proc/cmdline */
        saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
 
diff --git a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c
deleted file mode 100644 (file)
index 93bdc0f..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * linux/arch/i386/kernel/sysenter.c
- *
- * (C) Copyright 2002 Linus Torvalds
- *
- * This file contains the needed initializations to support sysenter.
- */
-
-#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/thread_info.h>
-#include <linux/sched.h>
-#include <linux/gfp.h>
-#include <linux/string.h>
-#include <linux/elf.h>
-
-#include <asm/cpufeature.h>
-#include <asm/msr.h>
-#include <asm/pgtable.h>
-#include <asm/unistd.h>
-
-extern asmlinkage void sysenter_entry(void);
-
-void enable_sep_cpu(void *info)
-{
-       int cpu = get_cpu();
-       struct tss_struct *tss = &per_cpu(init_tss, cpu);
-
-       tss->ss1 = __KERNEL_CS;
-       tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss;
-       wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
-       wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp1, 0);
-       wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) sysenter_entry, 0);
-       put_cpu();      
-}
-
-/*
- * These symbols are defined by vsyscall.o to mark the bounds
- * of the ELF DSO images included therein.
- */
-extern const char vsyscall_int80_start, vsyscall_int80_end;
-extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
-
-static int __init sysenter_setup(void)
-{
-       void *page = (void *)get_zeroed_page(GFP_ATOMIC);
-
-       __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
-
-       if (1 /* XXXcl not yet */ || !boot_cpu_has(X86_FEATURE_SEP)) {
-               memcpy(page,
-                      &vsyscall_int80_start,
-                      &vsyscall_int80_end - &vsyscall_int80_start);
-               return 0;
-       }
-
-       memcpy(page,
-              &vsyscall_sysenter_start,
-              &vsyscall_sysenter_end - &vsyscall_sysenter_start);
-
-       on_each_cpu(enable_sep_cpu, NULL, 1, 1);
-       return 0;
-}
-
-__initcall(sysenter_setup);
index 8ca7897c78eedd3254761044edf33320841fb896..f885505a8b37bfca37aa0e4052b1f9bcf53937b8 100644 (file)
@@ -67,10 +67,6 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc)
        return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
 }
 
-#if 0
-static int count2; /* counter for mark_offset_tsc() */
-#endif
-
 /* Cached *multiplier* to convert TSC counts to microseconds.
  * (see the equation below).
  * Equal to 2^32 * (1 / (clocks per usec) ).
@@ -93,13 +89,13 @@ static unsigned long get_offset_tsc(void)
        eax -= shadow_tsc_stamp;
 
        /*
-        * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient
-        *             = (tsc_low delta) * (usecs_per_clock)
-        *             = (tsc_low delta) * (usecs_per_jiffy / clocks_per_jiffy)
+         * Time offset = (tsc_low delta) * fast_gettimeoffset_quotient
+         *             = (tsc_low delta) * (usecs_per_clock)
+         *             = (tsc_low delta) * (usecs_per_jiffy / clocks_per_jiffy)
         *
         * Using a mull instead of a divl saves up to 31 clock cycles
         * in the critical path.
-        */
+         */
 
        __asm__("mull %2"
                :"=a" (eax), "=d" (edx)
index 8153348f5f57cffeb808c8a2a3799aaf9016b1e0..e7a58a8c6446532f83e76b9ecca6b566e2528e9d 100644 (file)
@@ -127,7 +127,7 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
                addr = *stack++;
                if (__kernel_text_address(addr)) {
                        printk(" [<%08lx>]", addr);
-                       print_symbol(" %s\n", addr);
+                       print_symbol(" %s", addr);
                        printk("\n");
                }
        }
@@ -737,8 +737,8 @@ fastcall void do_debug(struct pt_regs * regs, long error_code)
        /* If this is a kernel mode trap, save the user PC on entry to 
         * the kernel, that's what the debugger can make sense of.
         */
-       info.si_addr = ((regs->xcs & 2) == 0) ? (void __user *)tsk->thread.eip : 
-                                               (void __user *)regs->eip;
+       info.si_addr = ((regs->xcs & 2) == 0) ? (void __user *)tsk->thread.eip
+                                             : (void __user *)regs->eip;
        force_sig_info(SIGTRAP, &info, tsk);
 
        /* Disable additional traps. They'll be re-enabled when
@@ -954,58 +954,6 @@ void __init trap_init_f00f_bug(void)
 }
 #endif
 
-#define _set_gate(gate_addr,type,dpl,addr,seg) \
-do { \
-  int __d0, __d1; \
-  __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \
-       "movw %4,%%dx\n\t" \
-       "movl %%eax,%0\n\t" \
-       "movl %%edx,%1" \
-       :"=m" (*((long *) (gate_addr))), \
-        "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \
-       :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \
-        "3" ((char *) (addr)),"2" ((seg) << 16)); \
-} while (0)
-
-
-/*
- * This needs to use 'idt_table' rather than 'idt', and
- * thus use the _nonmapped_ version of the IDT, as the
- * Pentium F0 0F bugfix can have resulted in the mapped
- * IDT being write-protected.
- */
-void set_intr_gate(unsigned int n, void *addr)
-{
-       _set_gate(idt_table+n,14,0,addr,__KERNEL_CS);
-}
-
-#if 0
-/*
- * This routine sets up an interrupt gate at directory privilege level 3.
- */
-static inline void set_system_intr_gate(unsigned int n, void *addr)
-{
-       _set_gate(idt_table+n, 14, 3, addr, __KERNEL_CS);
-}
-
-static void __init set_trap_gate(unsigned int n, void *addr)
-{
-       _set_gate(idt_table+n,15,0,addr,__KERNEL_CS);
-}
-
-static void __init set_system_gate(unsigned int n, void *addr)
-{
-       _set_gate(idt_table+n,15,3,addr,__KERNEL_CS);
-}
-#endif
-
-#if 0
-static void __init set_task_gate(unsigned int n, unsigned int gdt_entry)
-{
-       _set_gate(idt_table+n,5,0,0,(gdt_entry<<3));
-}
-#endif
-
 
 /* NB. All these are "trap gates" (i.e. events_mask isn't cleared). */
 static trap_info_t trap_table[] = {
@@ -1030,14 +978,14 @@ static trap_info_t trap_table[] = {
        { 18, 0, __KERNEL_CS, (unsigned long)machine_check              },
 #endif
        { 19, 0, __KERNEL_CS, (unsigned long)simd_coprocessor_error     },
-       { SYSCALL_VECTOR, 3, __KERNEL_CS, (unsigned long)system_call    },
-       {  0, 0,           0, 0                                         }
+       { SYSCALL_VECTOR,  3, __KERNEL_CS, (unsigned long)system_call   },
+       {  0, 0,           0, 0                                         }
 };
 
 void __init trap_init(void)
 {
-       HYPERVISOR_set_trap_table(trap_table);    
-        HYPERVISOR_set_fast_trap(SYSCALL_VECTOR);
+       HYPERVISOR_set_trap_table(trap_table);
+       HYPERVISOR_set_fast_trap(SYSCALL_VECTOR);
 
        /*
         * default LDT is a single-entry callgate to lcall7 for iBCS
diff --git a/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S
deleted file mode 100644 (file)
index e0512cc..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/* ld script to make i386 Linux kernel
- * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
- */
-
-#include <asm-generic/vmlinux.lds.h>
-#include <asm/thread_info.h>
-#include <asm/page.h>
-
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
-OUTPUT_ARCH(i386)
-ENTRY(startup_32)
-jiffies = jiffies_64;
-SECTIONS
-{
-  . = __PAGE_OFFSET + 0x100000;
-  /* read-only */
-  _text = .;                   /* Text and read-only data */
-  .text : {
-       *(.text)
-       SCHED_TEXT
-       LOCK_TEXT
-       *(.fixup)
-       *(.gnu.warning)
-       } = 0x9090
-
-  _etext = .;                  /* End of text section */
-
-  . = ALIGN(16);               /* Exception table */
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  RODATA
-
-  /* writeable */
-  .data : {                    /* Data */
-       *(.data)
-       CONSTRUCTORS
-       }
-
-  . = ALIGN(4096);
-  __nosave_begin = .;
-  .data_nosave : { *(.data.nosave) }
-  . = ALIGN(4096);
-  __nosave_end = .;
-
-  . = ALIGN(4096);
-  .data.page_aligned : { *(.data.idt) }
-
-  . = ALIGN(32);
-  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
-  _edata = .;                  /* End of data section */
-
-  . = ALIGN(THREAD_SIZE);      /* init_task */
-  .data.init_task : { *(.data.init_task) }
-
-  /* will be freed after init */
-  . = ALIGN(4096);             /* Init code and data */
-  __init_begin = .;
-  .init.text : { 
-       _sinittext = .;
-       *(.init.text)
-       _einittext = .;
-  }
-  .init.data : { *(.init.data) }
-  . = ALIGN(16);
-  __setup_start = .;
-  .init.setup : { *(.init.setup) }
-  __setup_end = .;
-  __initcall_start = .;
-  .initcall.init : {
-       *(.initcall1.init) 
-       *(.initcall2.init) 
-       *(.initcall3.init) 
-       *(.initcall4.init) 
-       *(.initcall5.init) 
-       *(.initcall6.init) 
-       *(.initcall7.init)
-  }
-  __initcall_end = .;
-  __con_initcall_start = .;
-  .con_initcall.init : { *(.con_initcall.init) }
-  __con_initcall_end = .;
-  SECURITY_INIT
-  . = ALIGN(4);
-  __alt_instructions = .;
-  .altinstructions : { *(.altinstructions) } 
-  __alt_instructions_end = .; 
- .altinstr_replacement : { *(.altinstr_replacement) } 
-  /* .exit.text is discard at runtime, not link time, to deal with references
-     from .altinstructions and .eh_frame */
-  .exit.text : { *(.exit.text) }
-  .exit.data : { *(.exit.data) }
-  . = ALIGN(4096);
-  __initramfs_start = .;
-  .init.ramfs : { *(.init.ramfs) }
-  __initramfs_end = .;
-  . = ALIGN(32);
-  __per_cpu_start = .;
-  .data.percpu  : { *(.data.percpu) }
-  __per_cpu_end = .;
-  . = ALIGN(4096);
-  __init_end = .;
-  /* freed after init ends here */
-       
-  __bss_start = .;             /* BSS */
-  .bss : {
-       *(.bss.page_aligned)
-       *(.bss)
-  }
-  . = ALIGN(4);
-  __bss_stop = .; 
-
-  _end = . ;
-
-  /* This is where the kernel creates the early boot page tables */
-  . = ALIGN(4096);
-  pg0 = .;
-
-  /* Sections to be discarded */
-  /DISCARD/ : {
-       *(.exitcall.exit)
-       }
-
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
-}
index 7d9acce8713ee6417c120991111b555e26e41e0e..b869fad317ce2ff57082266a312acf886f5d69cf 100644 (file)
@@ -454,7 +454,8 @@ no_context:
        printk(KERN_ALERT " printing eip:\n");
        printk("%08lx\n", regs->eip);
        page = ((unsigned long *) cur_pgd)[address >> 22];
-       printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page, machine_to_phys(page));
+       printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page,
+              machine_to_phys(page));
        /*
         * We must not directly access the pte in the highpte
         * case, the page table might be allocated in highmem.
@@ -467,7 +468,8 @@ no_context:
                address &= 0x003ff000;
                page = machine_to_phys(page);
                page = ((unsigned long *) __va(page))[address >> PAGE_SHIFT];
-               printk(KERN_ALERT "*pte = ma %08lx pa %08lx\n", page, machine_to_phys(page));
+               printk(KERN_ALERT "*pte = ma %08lx pa %08lx\n", page,
+                      machine_to_phys(page));
        }
 #endif
        show_trace(NULL, (unsigned long *)&regs[1]);
index 5e140759c32f34dc7bd8c65f2502985b19db8c41..0dc6dd25ab7430bd4be5091ab67c625e82419baf 100644 (file)
 
 #ifndef CONFIG_XEN_PHYSDEV_ACCESS
 
-void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags)
-{ return NULL; }
+void * __ioremap(unsigned long phys_addr, unsigned long size,
+                unsigned long flags)
+{
+       return NULL;
+}
 
 void *ioremap_nocache (unsigned long phys_addr, unsigned long size)
-{ return NULL; }
+{
+       return NULL;
+}
 
 void iounmap(volatile void __iomem *addr)
-{ }
+{
+}
 
 void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
-{ return NULL; }
+{
+       return NULL;
+}
 
 void __init bt_iounmap(void *addr, unsigned long size)
-{ }
+{
+}
 
 #else
 
@@ -140,8 +149,8 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
        if (!size || last_addr < phys_addr)
                return NULL;
 
-        if (phys_addr >= 0x0 && last_addr < 0x100000)
-                return isa_bus_to_virt(phys_addr);
+       if (phys_addr >= 0x0 && last_addr < 0x100000)
+               return isa_bus_to_virt(phys_addr);
 
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
@@ -246,8 +255,8 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 void iounmap(volatile void __iomem *addr)
 {
        struct vm_struct *p;
-        if ((unsigned long)addr <= 0x100000)
-                return;
+       if ((unsigned long)addr <= 0x100000)
+               return;
        if ((void __force *) addr <= high_memory) 
                return; 
        p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr));
@@ -276,8 +285,8 @@ void __init *bt_ioremap(unsigned long phys_addr, unsigned long size)
        if (!size || last_addr < phys_addr)
                return NULL;
 
-        if (phys_addr >= 0x0 && last_addr < 0x100000)
-                return isa_bus_to_virt(phys_addr);
+       if (phys_addr >= 0x0 && last_addr < 0x100000)
+               return isa_bus_to_virt(phys_addr);
 
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
@@ -320,8 +329,8 @@ void __init bt_iounmap(void *addr, unsigned long size)
        enum fixed_addresses idx;
 
        virt_addr = (unsigned long)addr;
-        if (virt_addr < 0x100000)
-                return;
+       if (virt_addr < 0x100000)
+               return;
        if (virt_addr < fix_to_virt(FIX_BTMAP_BEGIN))
                return;
        offset = virt_addr & ~PAGE_MASK;
@@ -345,51 +354,51 @@ void __init bt_iounmap(void *addr, unsigned long size)
   __direct_mk_pte((physpage) >> PAGE_SHIFT, pgprot)
 
 static inline void direct_remap_area_pte(pte_t *pte, 
-                                        unsigned long address, 
-                                        unsigned long size,
-                                       mmu_update_t **v)
+                                        unsigned long address, 
+                                        unsigned long size,
+                                        mmu_update_t **v)
 {
-    unsigned long end;
-
-    address &= ~PMD_MASK;
-    end = address + size;
-    if (end > PMD_SIZE)
-        end = PMD_SIZE;
-    if (address >= end)
-        BUG();
-
-    do {
-        (*v)->ptr = virt_to_machine(pte);
-        (*v)++;
-        address += PAGE_SIZE;
-        pte++;
-    } while (address && (address < end));
+       unsigned long end;
+
+       address &= ~PMD_MASK;
+       end = address + size;
+       if (end > PMD_SIZE)
+               end = PMD_SIZE;
+       if (address >= end)
+               BUG();
+
+       do {
+               (*v)->ptr = virt_to_machine(pte);
+               (*v)++;
+               address += PAGE_SIZE;
+               pte++;
+       } while (address && (address < end));
 }
 
 static inline int direct_remap_area_pmd(struct mm_struct *mm,
-                                        pmd_t *pmd, 
-                                        unsigned long address, 
-                                        unsigned long size,
+                                       pmd_t *pmd, 
+                                       unsigned long address, 
+                                       unsigned long size,
                                        mmu_update_t **v)
 {
-    unsigned long end;
-
-    address &= ~PGDIR_MASK;
-    end = address + size;
-    if (end > PGDIR_SIZE)
-        end = PGDIR_SIZE;
-    if (address >= end)
-        BUG();
-    do {
-        pte_t *pte = pte_alloc_map(mm, pmd, address);
-        if (!pte)
-            return -ENOMEM;
-        direct_remap_area_pte(pte, address, end - address, v);
-       pte_unmap(pte);
-        address = (address + PMD_SIZE) & PMD_MASK;
-        pmd++;
-    } while (address && (address < end));
-    return 0;
+       unsigned long end;
+
+       address &= ~PGDIR_MASK;
+       end = address + size;
+       if (end > PGDIR_SIZE)
+               end = PGDIR_SIZE;
+       if (address >= end)
+               BUG();
+       do {
+               pte_t *pte = pte_alloc_map(mm, pmd, address);
+               if (!pte)
+                       return -ENOMEM;
+               direct_remap_area_pte(pte, address, end - address, v);
+               pte_unmap(pte);
+               address = (address + PMD_SIZE) & PMD_MASK;
+               pmd++;
+       } while (address && (address < end));
+       return 0;
 }
  
 int __direct_remap_area_pages(struct mm_struct *mm,
@@ -397,85 +406,82 @@ int __direct_remap_area_pages(struct mm_struct *mm,
                              unsigned long size, 
                              mmu_update_t *v)
 {
-    pgd_t * dir;
-    unsigned long end = address + size;
-
-    dir = pgd_offset(mm, address);
-    flush_cache_all();
-    if (address >= end)
-        BUG();
-    spin_lock(&mm->page_table_lock);
-    do {
-        pmd_t *pmd = pmd_alloc(mm, dir, address);
-        if (!pmd)
-           return -ENOMEM;
-        direct_remap_area_pmd(mm, pmd, address, end - address, &v);
-        address = (address + PGDIR_SIZE) & PGDIR_MASK;
-        dir++;
-
-    } while (address && (address < end));
-    spin_unlock(&mm->page_table_lock);
-    flush_tlb_all();
-    return 0;
+       pgd_t * dir;
+       unsigned long end = address + size;
+
+       dir = pgd_offset(mm, address);
+       flush_cache_all();
+       if (address >= end)
+               BUG();
+       spin_lock(&mm->page_table_lock);
+       do {
+               pmd_t *pmd = pmd_alloc(mm, dir, address);
+               if (!pmd)
+                       return -ENOMEM;
+               direct_remap_area_pmd(mm, pmd, address, end - address, &v);
+               address = (address + PGDIR_SIZE) & PGDIR_MASK;
+               dir++;
+
+       } while (address && (address < end));
+       spin_unlock(&mm->page_table_lock);
+       flush_tlb_all();
+       return 0;
 }
 
 
 int direct_remap_area_pages(struct mm_struct *mm,
-                            unsigned long address, 
-                            unsigned long machine_addr,
-                            unsigned long size, 
-                            pgprot_t prot,
-                            domid_t  domid)
+                           unsigned long address, 
+                           unsigned long machine_addr,
+                           unsigned long size, 
+                           pgprot_t prot,
+                           domid_t  domid)
 {
-    int i;
-    unsigned long start_address;
+       int i;
+       unsigned long start_address;
 #define MAX_DIRECTMAP_MMU_QUEUE 130
-    mmu_update_t u[MAX_DIRECTMAP_MMU_QUEUE], *w, *v;
-
-    u[0].ptr  = MMU_EXTENDED_COMMAND;
-    u[0].val  = MMUEXT_SET_FOREIGNDOM;
-    u[0].val |= (unsigned long)domid << 16;
-    v = w = &u[1];
-
-    start_address = address;
-
-    for( i = 0; i < size; i += PAGE_SIZE )
-    {
-       if ( (v - u) == MAX_DIRECTMAP_MMU_QUEUE )
-       {
-           /* Fill in the PTE pointers. */
-           __direct_remap_area_pages( mm,
-                                      start_address, 
-                                      address-start_address, 
-                                      w);
+       mmu_update_t u[MAX_DIRECTMAP_MMU_QUEUE], *w, *v;
+
+       u[0].ptr  = MMU_EXTENDED_COMMAND;
+       u[0].val  = MMUEXT_SET_FOREIGNDOM;
+       u[0].val |= (unsigned long)domid << 16;
+       v = w = &u[1];
+
+       start_address = address;
+
+       for(i = 0; i < size; i += PAGE_SIZE) {
+               if ((v - u) == MAX_DIRECTMAP_MMU_QUEUE) {
+                       /* Fill in the PTE pointers. */
+                       __direct_remap_area_pages(mm,
+                                                 start_address, 
+                                                 address-start_address, 
+                                                 w);
            
-           if ( HYPERVISOR_mmu_update(u, v - u, NULL) < 0 )
-               return -EFAULT;     
-           v = w;
-           start_address = address;
+                       if (HYPERVISOR_mmu_update(u, v - u, NULL) < 0)
+                               return -EFAULT;     
+                       v = w;
+                       start_address = address;
+               }
+
+               /*
+                * Fill in the machine address: PTE ptr is done later by
+                * __direct_remap_area_pages(). 
+                */
+               v->val = (machine_addr & PAGE_MASK) | pgprot_val(prot);
+
+               machine_addr += PAGE_SIZE;
+               address += PAGE_SIZE; 
+               v++;
        }
 
-       /*
-         * Fill in the machine address: PTE ptr is done later by
-         * __direct_remap_area_pages(). 
-         */
-        v->val = (machine_addr & PAGE_MASK) | pgprot_val(prot);
-
-        machine_addr += PAGE_SIZE;
-        address += PAGE_SIZE; 
-        v++;
-    }
-
-    if ( v != w )
-    {
-       /* get the ptep's filled in */
-       __direct_remap_area_pages(mm,
-                                  start_address, 
-                                  address-start_address, 
-                                  w);   
-       if ( unlikely(HYPERVISOR_mmu_update(u, v - u, NULL) < 0) )
-           return -EFAULT;         
-    }
+       if (v != w) {
+               /* get the ptep's filled in */
+               __direct_remap_area_pages(mm,
+                                         start_address, 
+                                         address-start_address, 
+                                         w);    
+               if (unlikely(HYPERVISOR_mmu_update(u, v - u, NULL) < 0))
+                       return -EFAULT;     
+       }
     
-    return 0;
+       return 0;
 }
index 3e987bee23d2cf2bcca026047a8a26caf170b147..8924b15f66c3730e0de128d6fc1aab1e46f6e797 100644 (file)
@@ -4,8 +4,10 @@
 
 XENARCH        := $(subst ",,$(CONFIG_XENARCH))
 
-$(obj)/vmlinux.lds:
-       @ln -fsn $(srctree)/arch/$(ARCH)/$(XENARCH)/kernel/vmlinux.lds $@
+CPPFLAGS_vmlinux.lds += -U$(XENARCH)
+
+$(obj)/vmlinux.lds.S:
+       @ln -fsn $(srctree)/arch/$(XENARCH)/kernel/vmlinux.lds.S $@
 
 extra-y += vmlinux.lds
 
index 8f6c7b2daa64af11aaad097f3a52f23548624dd7..85edefdf307a7935805560df187152126464f145 100644 (file)
@@ -28,6 +28,7 @@ void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
        clear_bit(X86_FEATURE_DE, c->x86_capability);
        clear_bit(X86_FEATURE_PSE, c->x86_capability);
        clear_bit(X86_FEATURE_PGE, c->x86_capability);
+       clear_bit(X86_FEATURE_SEP, c->x86_capability);
        clear_bit(X86_FEATURE_MTRR, c->x86_capability);
        clear_bit(X86_FEATURE_FXSR, c->x86_capability);
 }